import http from "./request.ts"

//品牌列表
export const brandList = (params: IBrandList): RES<IBrandModel> => http.get('/brand/list', { params })

//品牌状态是否显示 
export const brandShowUpdateId = (ids: number[], showStatus: number): RES<number> => http.post(`/brand/update/showStatus?ids=${ids}&showStatus=${showStatus}`)

//品牌制造商状态
export const brandFactoryUpdateId = (ids: number[], factoryStatus: number): RES<number> => http.post(`/brand/update/factoryStatus?ids=${ids}&factoryStatus=${factoryStatus}`)

//删除单个品牌
export const brandDelete = (id: number): RES<number> => http.get(`/brand/delete/${id}`)

//批量删除品牌 
export const brandDeleteBatch = (ids: number[]): RES<number> => http.post(`/brand/delete/batch?ids=${ids}`,)

//添加品牌 
export const brandCreate = (params: IBrand): RES<number> => http.post(`/brand/create`, params)

//根据id查询某个品牌 /brand/{id}
export const brandInquireId = (id: number): RES<IBrand> => http.get(`/brand/${id}`)

//更新品牌 /brand/update/{id}
export const brandUpdate = (id: number, params: IBrand): RES<number> => http.post(`/brand/update/${id}`, params)



